﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Windows;
using System.Windows.Controls;
using System.Windows.Data;
using System.Windows.Documents;
using System.Windows.Input;
using System.Windows.Media;
using System.Windows.Media.Imaging;
using System.Windows.Navigation;
using System.Windows.Shapes;
using System.ComponentModel.Composition;
using Microsoft.Practices.ServiceLocation;
using Upreader.Presentation.Client.ViewModel;

namespace Upreader.Presentation.Client
{
    /// <summary>
    /// Interaction logic for MainWindow.xaml
    /// </summary>
    [Export]
    public partial class MainWindow : Window
    {
        public MainWindow()
        {
            InitializeComponent();
            this.Loaded += (e, args) =>
            {
                DataContext = ViewModel;
            };
        }

        [Import]
        public MainViewModel ViewModel
        {
            get;
            set;
        }

        private void CloseClick(object sender, System.Windows.RoutedEventArgs e)
        {
        	Close();
        }

        private void MinimizeClick(object sender, System.Windows.RoutedEventArgs e)
        {
        	WindowState = WindowState.Minimized;
        }

        private void WindowMouseLeftButtonDown(object sender, System.Windows.Input.MouseButtonEventArgs e)
        {
        	DragMove();
        }
    }
}
